package com.nervenets.shopping.controller.user.params;

import com.nervenets.general.Global;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class MobileLoginByCodeParams implements Serializable {
    @ApiModelProperty(value = "手机号", required = true)
    @Pattern(regexp = Global.RegExp.MOBILE, message = "请输入正确的手机号码")
    private String mobile;
    @ApiModelProperty(value = "验证码", required = true)
    @NotBlank
    @Size(min = 6, max = 6)
    private String code;
}
